<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>225-表单元素方法.html</title>
</head>
<body>
	<form action="https://www.baidu.com" id="form1" target="_black">
		<div>
			用户名:<input type="text" name="username" value="chris">
		</div>
		<div>
			密码:<input type="password" name="password">
		</div>
		<div>
			性别:
			<input type="radio" name="sex" value="male">男
			<input type="radio" name="sex" value="female">女
		</div>
		<div>
			爱好:
			<input type="checkbox" name="hobby" value="basketball">篮球
			<input type="checkbox" name="hobby" value="football">足球
		</div>
		<div>
			<select name="city" id="">
				<option value="bj">北京</option>
				<option value="sh">上海</option>
				<option value="sz">深圳</option>
			</select>
		</div>
		<div>
			<input type="submit" value="提交">
		</div>
	</form>
	<form action="">
		
	</form>
</body>
<script>
	var oBtn = document.getElementById('btn');
	var oFrom = document.forms[0];
	var oUsername = oFrom.username;
	oUsername = focus();
	oUsername = blur();
</script>
</html>